package com.hippoframework.test;
import java.lang.reflect.Field;

import cn.hutool.core.util.ClassUtil;
import com.hippoframework.annotation.Autowired;
import com.hippoframework.annotation.Service;
import com.hippoframework.utils.ClassUtils;

/**
 * @author TylerW
 * @date 1/20/2020 4:50 PM
 */
@Service
public class UserServiceImpl implements UserService<User> {

    @Autowired
    private UserService<User> userService;

    public static void main(String[] args) {

        Field[] declaredFields = ClassUtil.getDeclaredFields(UserServiceImpl.class);
        Field field = declaredFields[0];//userService

        boolean injectable = ClassUtils.isInjectable(UserServiceImpl.class, field, true);

        boolean equals = UserService.class.equals(field.getType());
        System.out.println(equals);

    }

    @Override
    public void test() {
        // customerService.test();
        System.out.println("UserServiceImpl");
    }
}
